package la.bbs558.entity.enums;

import lombok.Getter;

@Getter
public enum RedisKey {
    //邀请码
    INVITE_CODE("INVITE_CODE:"),
    //登录验证码
    SIGN_IN_VERIFY_CODE("SIGN_IN_VERIFY_CODE:"),
    //注册验证码
    SIGN_UP_VERIFY_CODE("SIGN_UP_VERIFY_CODE:"),
    //找回密码
    FORGET_VERIFY_CODE("FORGET_VERIFY_CODE:"),
    //角色
    USER_ROLE("USER_ROLE:"),
    //统计
    INDEX_STATISTICS("INDEX_STATISTICS"),
    //搜索
    SEARCH("SEARCH:"),
    GLOBAL_TOKEN("GLOBAL_TOKEN:"),
    //更新用户连续登录天数，一天一次
    USER_UPDATE_LOGIN_DAY("USER_UPDATE_LOGIN_DAY:"),
    ;

    private final String key;

    RedisKey(String key) {
        this.key = key;
    }

    public String spaceName(Object key) {
        return this.key + key;
    }
}
